package com.appistry.management.exception;

import com.appistry.api.rest.domain.RestResponse;

public class FabricManagerRestException extends FabricManagerException {
	private static final long serialVersionUID = 4887243528911089343L;
	private String restResponseStr;

	public FabricManagerRestException(RestResponse restResponse, String message, Throwable cause) {
		super(message, cause);
		this.restResponseStr = restResponse.toString();
	}

	public FabricManagerRestException(RestResponse restResponse, String message) {
		super(message);
		this.restResponseStr = restResponse.toString();
	}

	public FabricManagerRestException(RestResponse restResponse, Throwable cause) {
		super(cause);
		this.restResponseStr = restResponse.toString();
	}

	public FabricManagerRestException(RestResponse restResponse) {
		super();
		this.restResponseStr = restResponse.toString();
	}

	public String getRestResponse() {
		return restResponseStr;
	}
	
	@Override
	public String getMessage(){
		return super.getMessage() + " -- " + restResponseStr;
	}
	
	

}
